package com.dunshanasync.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dunshanasync.pojo.PageInstance;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;

/**
 * @author liwen406
 * @program: dunshan-pef
 * @description:
 * @date 2021-08-09 09:51:08
 */
@Mapper
public interface PageInstanceMapper extends BaseMapper<PageInstance> {

    @Insert("<script>" +
            "INTO `page_instance` (`page_id`, `site`, `vender_id`, `shop_id`, `channel_type`, `platform`, `theme_id`, `yn`, `create_time`, `modify_time`) values " +
            "<foreach collection='pageInstances' item='obj' separator=','>" +
            "(#{obj.pageId},#{obj.site},#{obj.venderId},#{obj.shopId},#{obj.channelType},#{obj.platform},#{obj.themeId},#{obj.yn},#{obj.createTime},#{obj.modifyTime})" +
            "</foreach>" +
            "</script>")
    Integer insertBatchSomeColumn(Collection<PageInstance> pageInstances);
}
